perm filename ALF.INF[ALF,DEK]1 blob sn#585249 filedate 1981-05-14 generic text, type T, neo UTF8
.ALF files (made by DVIALF, consumed by ZALF).

.ALF files only use the upper 32 bits, and are considered to be a stream
of 8-bit bytes, first byte=most significant.

First comes a set of ANT file names in the following form: The first four
bytes give a font number (or -1 to signify the end of the ANT file names),
the next byte is the length n of the ANT file name, and the next n bytes
give the full name of the ANT file (e.g. "PS:<TEX.FONTS>CMR10.1200ANT.13"
on TOPS20).

The rest of the ALF file is a stream of bytes to be sent directly to the
Alphatype (with ZALF inserting checksums) with the following exceptions:
The escape character 11011111 (= decimal 223) means something special is
coming up. The next byte (call it B) should be read, and based on its
high order bits, ZALF is to proceed in one of four ways:

11011111 0fffffff kkkkkkkk llllllll nnnnnnnn mmmmmmmm	<SEND CHAR BOUNDARY>
11011111 10hhhhhh hhhhhwww wwwwwwww nnnnnnnn mmmmmmmm	<SEND RULE BOUNDARY>
11011111 11000000					<SEND 223>
11011111 11100000					<STOP>

In the <SEND CHAR BOUNDARY> case, `f' is the font number, `l' is the
character location, and `mn' is the number of boundary bytes. This case is
only used in the midst of an AlphaTEX "New-Char" instruction. ZALF is
supposed to send the bytes n followed by m (which is the "n0&n1" part of
"New-Char"), and then to send mmmmmmmmnnnnnnnn bytes from the ANT file for
font f, beginning at word number llllllllkkkkkkkk in that file. In the <SEND RULE
BOUNDARY> case, `h' is the height in dots, and `w' is the width in dots
of a rule which ZALF is to send the boundary description of. This also is
used in New-Char instructions, and the bytes n&m should be sent just before
the boundary data is sent. (They are redundant but ZALF should check that
the total number of boundary bytes for h and w agrees with the number mn
computed by DVIALF, as a valuable precautionary measure.) The <SEND
223> case simply means that ZALF is to send a 223 to the Alphatype. Finally,
the <STOP> case means that this is the end of the ALF file, and no more
is to be sent.